<!--
 * @Author: yan_hai_dong 891236760@qq.com
 * @Date: 2022-07-14 10:45:02
 * @LastEditors: yan_hai_dong 891236760@qq.com
 * @LastEditTime: 2022-07-14 10:58:33
 * @FilePath: \app\src\components\PrintTable\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<script>
import { Table } from "element-ui";
export default {
  extends: Table,
  mounted() {
    this.$nextTick(() => {
      this.$el
        .querySelector(".el-table__body-wrapper table")
        .appendChild(
          this.$el
            .querySelector(".el-table__header-wrapper table thead")
            .cloneNode(true)
        );
    });
  },
};
</script>

<style lang="less" scoped>
.el-table {
  /deep/.el-table__body-wrapper table thead {
    display: none;
  }
  @media print {
    /deep/.el-table__header-wrapper table thead {
      display: none;
    }
    /deep/.el-table__body-wrapper table thead {
      display: table-header-group;
    }
  }
}
</style>